{% extends "admin/base_site.html" %}
{% load i18n %}{% load url from future %}
{% block bodyclass %}grp-doc{% endblock %}
{% block content-class %}{% endblock %}
{% block title %}Grappelli Documentation &raquo; Search-Form{% endblock %}

{% block extrahead %}
    <script type="text/javascript" charset="utf-8">
        (function($) {
            $(document).ready(function() {
                $("#grp-content-container .grp-group").grp_collapsible_group();
                $("#grp-content-container .grp-collapse").grp_collapsible({
                    on_init: function(elem, options) {
                        // open collapse (and all collapse parents) in case of errors
                        if (elem.find("ul.errorlist").length > 0) {
                            elem.removeClass("grp-closed")
                                .addClass("grp-open");
                            elem.parents(".grp-collapse")
                                .removeClass("grp-closed")
                                .addClass("grp-open");
                        }
                    }
                });
            });
        })(django.jQuery);
    </script>
{% endblock %}

{% block breadcrumbs %}
    <ul>
        <li><a href="../">Grappelli Documentation</a></li>
        <li>Search-Form</li>
    </ul>
{% endblock %}

{% block content %}
    <h1>Search-Form</h1>
    <div class="g-d-c">
        <section>
            <div class="g-d-24">
                <div class="grp-doc-description">
                    <h1>Basics</h1>
                    <p>The search-form is meant to appear in a <span class="grp-doc-class">.grp-row</span> within a <span class="grp-doc-class">.grp-module</span>. Basically, it is a <span class="grp-doc-dom"><span>form.grp-search-form</span></span> containing an <span class="grp-doc-dom"><span>input.grp-searchfield</span></span> and a <span class="grp-doc-dom"><span>button.grp-search-button</span></span>.</p>
                    <p><small>Note: Make sure to wrap the search-form with spaceless-tags to avoid whitespaces.</small></p>
                </div>
            </div>
            <div class="g-d-24">
                <div class="grp-doc-code-source">
                    <div class="grp-module">
                        <div class="grp-row">
                            <form action="" method="get" class="grp-search-form">
                                <input type="text" name="" value="" class="grp-search-field" />
                                <button type="submit" value="" class="grp-search-button"></button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <div class="g-d-24">
                <div class="grp-doc-code"><pre><code>{% filter force_escape %}
<div class="grp-module">
    <div class="grp-row">
        {% templatetag openblock %} spaceless {% templatetag closeblock %}
            <form action="" method="get" class="grp-search-form">
                <input type="text" name="" value="" class="grp-search-field" />
                <button type="submit" value="" class="grp-search-button"></button>
            </form>
        {% templatetag openblock %} endspaceless {% templatetag closeblock %}
    </div>
</div>
{% endfilter %}</code></pre></div>
            </div>
        </section>
        <section>
            <div class="g-d-24">
                <div class="grp-doc-description">
                    <h1>Full Code of a Search-Form</h1>
                    <p>Take a look at Grappellis search_form.html to get the full code of a search-form (e.g. like it is used in a <a href="{% url 'grp_doc_change_list' %}">change-list</a>).</p>
                </div>
            </div>
        </section>
    </div>
{% endblock %}

